#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;
#include"string.h"


void test1()
{
	xiaolin::string s1("hello world\0");
	cout << s1.c_str() << endl;

	for (size_t i = 0; i < s1.size(); i++)
	{
		s1[i]++;

	}
	cout << endl;
	for (size_t i = 0; i < s1.size(); i++)
	{
		cout << s1[i] << " ";

	}
	cout << endl;
	xiaolin::string::iterator it = s1.begin();
	while (it != s1.end())
	{
		cout << *it++ << " ";
	}
	cout << endl;

	for (auto ch :s1)
	{
		cout << ch << " ";
	}
	cout << endl;


	s1 += 'c';
	cout << s1.c_str() << " ";
	cout << endl;
	s1 += "hello haoqing";
	cout << s1.c_str() << " ";
	cout << endl;
	s1.append(" nihao meinv!!");
	cout << s1.c_str() << " ";
	cout << endl;
}

int main()
{
	test1();
	return 0;
}